# -*- coding: utf-8 -*-

import pymssql

conn = pymssql.connect(host='192.168.1.106', user='sa', password='sa', database='OMG171111',as_dict=True)
cur = conn.cursor()

cur.execute('SELECT * FROM [OMG CRONUS Thailand Co_ Ltd_$Customer]')
row = cur.fetchone()
while row:
    print "No=%s, Name=%s" % (row['No_'], row['City'].decode('cp874'))
    row = cur.fetchone()
    #insert new line
cur.close()